package top.healthylife;

import com.alibaba.fastjson.JSON;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.Map;

/**
 * @author Gaozexi on 2020/5/20 19:06
 * Step by Step  and Stand on,  You Are The Best Investment!
 */
@RunWith(SpringRunner.class)
@SpringBootTest
public class testJson {
    @Test
    public void testJson () throws Exception {
        Map map = JSON.parseObject("{\"client\":\"MY-PROVIDER-ping\",\"server\": \"pong\"," +
                "\"result\":\"success\"}", Map.class);
        System.out.println("map.get(\"result\") = " + map.get("result"));

    }
}
